<?php
namespace app\ctrl;

//在php中，若类名和方法名一致，则该方法会被视为初始化方法，所以修改类名:Index=>IndexCtrl
class IndexCtrl extends \core\Phamster
{
	public function index()
	{
		$model = new \core\lib\Model();
		$sql = 'SELECT * FROM tablename';
		$res = $model->query($sql);
		dump($res->fetchAll());
		$conf = new \core\lib\Conf();
		$tmp = $conf->get('CTRL', 'route');
		$tmp = $conf->get('ACTION', 'route');
/*		$tmp = $conf->get('DSN', 'database');
		print_r($tmp);*/
		$this->assign('data','hello world');
		$this->display('index');
	}
}